package com.jctrip.hotel.source.model.hmein.resp;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonProperty;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @Author henry
 * @Date 2023/4/13 16:25
 * @Description
 */
@NoArgsConstructor
@Data
public class RoomStatusResult extends HmeinResult {

    // 酒店id
    @JsonProperty("HotelCd")
    private String HotelCd;
    //结果集合
    @JsonProperty("Products")
    private List<Products> Products;

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class Products implements Serializable {
        // 房型基础信息
        @JsonProperty("RoomType")
        private RoomType RoomType;
        // 房态集合
        @JsonProperty("RoomRates")
        private List<RoomRates> RoomRates;
    }

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class RoomRates implements Serializable {
        // 价格码
        @JsonProperty("RateCode")

        private String RateCode;
        // 价格码描述
        @JsonProperty("RateDesc")
        private String RateDesc;
        // 价格码名称
        @JsonProperty("RateName")
        private String RateName;
        // 促销码
        @JsonProperty("ActCd")
        private String ActCd;
        // 促销活动名称
        @JsonProperty("ActName")
        private String ActName;
        // 促销活动描述
        @JsonProperty("ActDesc")
        private String ActDesc;
        //  无用
        @JsonProperty("Enabled")
        private boolean Enabled;
        // 无用
        @JsonProperty("IsOffline")
        private boolean IsOffline;
        // 包价代码, 早餐值的判断在此处
        @JsonProperty("RatePackages")
        private List<RatePackages> RatePackages;
        // 每日活动详情
        @JsonProperty("RoomRateDetailDailys")
        private List<RoomRateDetailDailys> RoomRateDetailDailys;
        // 担保规则 这里目前都不需要，取消规则走默认，代码写死
        @JsonProperty("RoomRateGuaranteeRules")
        private List<RoomRateGuaranteeRules> RoomRateGuaranteeRules;
    }
    @Data
    public static class RatePackages {
        @JsonProperty("Code")
        private String Code;
        @JsonProperty("Name")
        private String Name;
        @JsonProperty("PackageDes")
        private String PackageDes;
        @JsonProperty("Price")
        private BigDecimal Price;
        @JsonProperty("PeopleNum")
        private Integer PeopleNum;
    }
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class RoomRateGuaranteeRules implements Serializable {
        // 房型码
        @JsonProperty("RoomTypeCode")
        private String RoomTypeCode;
        // 活动id
        @JsonProperty("ActCd")
        private String ActCd;
        // 价格码
        @JsonProperty("RateCode")
        private String RateCode;
        // 策略代码
        @JsonProperty("GuaranteeRuleCode")
        private String GuaranteeRuleCode;
        // 策略描述
        @JsonProperty("GuaranteeRuleName")
        private String GuaranteeRuleName;
        // 需要到达时间
        @JsonProperty("ArrivalTimeRequired")
        private int ArrivalTimeRequired;
        // 是否需要预付
        @JsonProperty("IsPrepay")
        private int IsPrepay;
        //  最晚保留时间 HH:mm
        @JsonProperty("HoldTime")
        private String HoldTime;
        // 取消规则
        @JsonProperty("RoomRateCancelRule")
        private RoomRateCancelRule RoomRateCancelRule;
        // 定金规则
        @JsonProperty("RoomRateDepositRule")
        private RoomRateDepositRule RoomRateDepositRule;
        @JsonProperty("RoomRateCommissionRule")
        private RoomRateCommissionRule RoomRateCommissionRule;
    }

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class RoomRateCancelRule implements Serializable {
        @JsonProperty("HotelCd")
        private Object HotelCd;
        @JsonProperty("RoomTypeCode")
        private Object RoomTypeCode;
        @JsonProperty("RateCode")
        private Object RateCode;
        @JsonProperty("GuaranteeRuleCode")
        private Object GuaranteeRuleCode;
        @JsonProperty("Code")
        private Object Code;
        @JsonProperty("Name")
        private Object Name;
        @JsonProperty("Remark")
        private Object Remark;
        @JsonProperty("RuleType")
        private Integer RuleType;
        @JsonProperty("DayBeforeArrival")
        private String DayBeforeArrival;
        @JsonProperty("CancelBeforeTime")
        private String CancelBeforeTime;
        @JsonProperty("PenaltyFee")
        private Object PenaltyFee;
    }

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class RoomRateDepositRule implements Serializable {
        @JsonProperty("HotelCd")
        private Object HotelCd;
        @JsonProperty("RoomTypeCode")
        private Object RoomTypeCode;
        @JsonProperty("GuaranteeRuleCode")
        private Object GuaranteeRuleCode;
        @JsonProperty("RateCode")
        private Object RateCode;
        @JsonProperty("Code")
        private Object Code;
        @JsonProperty("Name")
        private Object Name;
        @JsonProperty("Remark")
        private Object Remark;
        @JsonProperty("RuleType")
        private Object RuleType;
        @JsonProperty("DepositAmount")
        private Object DepositAmount;
        @JsonProperty("DayBeforeArrival")
        private Object DayBeforeArrival;
        @JsonProperty("DayBeforeBooking")
        private Object DayBeforeBooking;
    }

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class RoomRateCommissionRule implements Serializable {
        @JsonProperty("HotelCd")
        private Object HotelCd;
        @JsonProperty("RoomTypeCode")
        private Object RoomTypeCode;
        @JsonProperty("GuaranteeRuleCode")
        private Object GuaranteeRuleCode;
        @JsonProperty("RateCode")
        private Object RateCode;
        @JsonProperty("Code")
        private Object Code;
        @JsonProperty("Name")
        private Object Name;
        @JsonProperty("Calculation")
        private int Calculation;
        @JsonProperty("Amount")
        private double Amount;
        @JsonProperty("Remark")
        private Object Remark;
    }


    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class RoomType {
        // 房型编码
        @JsonProperty("RoomTypeCode")
        private String RoomTypeCode;
        // 酒店id
        @JsonProperty("HotelCd")
        private String HotelCd;
        // 时间段最小库存
        @JsonProperty("MinRoomNum")
        private int MinRoomNum;
        // 房型名称
        @JsonProperty("RoomTypeName")
        private String RoomTypeName;
        // 没用
        @JsonProperty("RoomTypeSort")
        private int RoomTypeSort;

        // ?不知道是啥
        @JsonProperty("RoomTypedFacilities")
        private Object RoomTypedFacilities;
        // 不知道是啥
        @JsonProperty("Descript")
        private Object Descript;
        // 成人可入住数量
        @JsonProperty("Adults")
        private int Adults;
        // 儿童可入住数量
        @JsonProperty("Children")
        private int Children;
    }

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class RoomRateDetailDailys {
        // 房型码
        @JsonProperty("RoomTypeCode")
        private String RoomTypeCode;
        // 促销id
        @JsonProperty("ActCd")
        private String ActCd;
        //价格码
        @JsonProperty("RateCode")
        private String RateCode;
        // ？？不知道
        @JsonProperty("CateCode")
        private Object CateCode;
        // 日期 2023-04-13T00:00:00Z
        @JsonProperty("StDate")
        private String StDate;
        // 一人价格 默认取这个
        @JsonProperty("Prs1")
        private BigDecimal Prs1;
        // 两人价格
        @JsonProperty("Prs2")
        private BigDecimal Prs2;
        //3人价格
        @JsonProperty("Prs3")
        private BigDecimal Prs3;
        //4人价格
        @JsonProperty("Prs4")
        private BigDecimal Prs4;
        //5人价格
        @JsonProperty("Prs5")
        private BigDecimal Prs5;
        // 加床价格
        @JsonProperty("ExtraBed")
        private BigDecimal ExtraBed;
        // 加儿童价格
        @JsonProperty("Child")
        private BigDecimal Child;
        // 可用房量
        @JsonProperty("AvailableRooms")
        private int AvailableRooms;
        //
        @JsonProperty("ResvPoints")
        private int ResvPoints;
        // 计税方式
        @JsonProperty("TaxFlag")
        private int TaxFlag;
        // 税金额
        @JsonProperty("Tax")
        private double Tax;
        //
        @JsonProperty("ServiceChargeFlag")
        private int ServiceChargeFlag;
        @JsonProperty("ServiceCharge")
        private double ServiceCharge;
        @JsonProperty("AdvBookin")
        private int AdvBookin;
        @JsonProperty("MinLogs")
        private int MinLogs;
        @JsonProperty("MaxLogs")
        private int MaxLogs;
        @JsonProperty("SegmentsCode")
        private Object SegmentsCode;
        @JsonProperty("SourcesCode")
        private Object SourcesCode;
        @JsonProperty("AccessLevel")
        private Object AccessLevel;
        @JsonProperty("Score")
        private int Score;
    }
}
